package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RecipeMapper;
import com.ruoyi.system.domain.Recipe;
import com.ruoyi.system.service.IRecipeService;

/**
 * 配方管理Service业务层处理
 * 
 * @author liukangzu
 * @date 2025-04-17
 */
@Service
public class RecipeServiceImpl implements IRecipeService 
{
    @Autowired
    private RecipeMapper recipeMapper;

    /**
     * 查询配方管理
     * 
     * @param recipeId 配方管理主键
     * @return 配方管理
     */
    @Override
    public Recipe selectRecipeByRecipeId(Integer recipeId)
    {
        return recipeMapper.selectRecipeByRecipeId(recipeId);
    }

    /**
     * 查询配方管理列表
     * 
     * @param recipe 配方管理
     * @return 配方管理
     */
    @Override
    public List<Recipe> selectRecipeList(Recipe recipe)
    {
        return recipeMapper.selectRecipeList(recipe);
    }

    /**
     * 新增配方管理
     * 
     * @param recipe 配方管理
     * @return 结果
     */
    @Override
    public int insertRecipe(Recipe recipe)
    {
        return recipeMapper.insertRecipe(recipe);
    }

    /**
     * 修改配方管理
     * 
     * @param recipe 配方管理
     * @return 结果
     */
    @Override
    public int updateRecipe(Recipe recipe)
    {
        return recipeMapper.updateRecipe(recipe);
    }

    /**
     * 批量删除配方管理
     * 
     * @param recipeIds 需要删除的配方管理主键
     * @return 结果
     */
    @Override
    public int deleteRecipeByRecipeIds(Integer[] recipeIds)
    {
        return recipeMapper.deleteRecipeByRecipeIds(recipeIds);
    }

    /**
     * 删除配方管理信息
     * 
     * @param recipeId 配方管理主键
     * @return 结果
     */
    @Override
    public int deleteRecipeByRecipeId(Integer recipeId)
    {
        return recipeMapper.deleteRecipeByRecipeId(recipeId);
    }
}
